﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Detail.aspx.cs" Inherits="FlickrXplorer.Web.Views.Photo.DetailPage" %>
<%@ Import Namespace="FlickrXplorer.Web.Utilities"%>
<%@ Import Namespace="FlickrXplorer.Web.ViewData" %>    

<%@ Register src="../Shared/PhotoTagControl.ascx" tagname="PhotoTagControl" tagprefix="uc1" %>

<%@ Register src="../Shared/MessageControl.ascx" tagname="MessageControl" tagprefix="uc2" %>

<%@ Register src="../Shared/BookmarkControl.ascx" tagname="BookmarkControl" tagprefix="uc3" %>

<div style="width:500px;">

<% 
   var detail = ViewData.Model;
   
    if (detail != null)
    { %>
</div>
<div style="position: relative;">
  <table style="width: 505px;">
  
    <%--
        Disabling debug info
        <%= PluginManager.Current.GetAllMainPhotoContent(this.ViewData.Model) %>
    
    --%>
    <tr>
      <td align="left">
        <table style="width: 500px;">
          <tr>
              <td>
                <span id="title" style="font-weight:bold;font-size:xx-large;"> <%= detail.Title%> </span>
                <input type="hidden" id="hPhotoId" value="<%= detail.Id %>" />
              </td>
          </tr>
      </table>
 </td>
 </tr>
 <tr >
 <td>
 <div >
    <img  id="detailPhoto" src="<%= detail.Url %>" alt="<%= detail.Title %>" /> 
    
 </div>
 <div style="font-size:12px;"> 
  <table style="width:500px;">
  <tr>
  <td>
    <table><tr><td><img src= "<%= Page.BuildUrlWithAppPath("/Views/Shared/Images/icon_public.gif" ) %>" alt="public"/></td><td><i>uploaded by <%= Html.ActionLink(detail.Username, "NsId", new RouteValueDictionary(new { controller = "Photo", nsId = detail.NsId }))%> on <%= detail.UploadedOn.ToShortDateString() %></i></td> 
    
    </tr> </table>
    </td>
    
    <td align="right" style="text-align:right;">
        <uc3:BookmarkControl ID="BookmarkControl1" runat="server" />
    </td>
    </tr>
    </table>
    
    
 </div>
 
<div id="About">
      <div class="photoDescription" id="description" style="width:495px;text-align:justify;">
        <%= detail.Description %>
     </div>
 </div>
 </td> 
</tr>
 <tr >
 <td>
 <% if (detail.Tags.Length > 0)
    { %>

    <div class="tagBox" >

<% foreach (string tag in detail.Tags)
   { 
       
       %>
   
        <%= Html.ActionLink(tag, "Tags", new RouteValueDictionary(new { controller = "Photo", name = tag }))%>

<%} %>
</div>


<% } %>
 </td> 
 
 <td>
       
 </td>
</tr>

<tr>
<td>

    <% Html.RenderPartial("CommentControl"); %>
   
    </td>
    <td>
   
    </td>
</tr>

</table>

<% }
   else
   { %>
    <uc2:MessageControl ID="MessageControl1" runat="server" />
 
<% } %>

</div>
